From 56435450bcdb7d667b0eba33469560fddf480929 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 10 Oct 2013 14:36:47 +0100 Subject: [PATCH] xen: arm: explicitly map 64 bit release address In case it is outside visible ram. Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini --- xen/arch/arm/arm64/smpboot.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c index 8239590739..8696ed6a79 100644 --- a/xen/arch/arm/arm64/smpboot.c +++ b/xen/arch/arm/arm64/smpboot.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include struct smp_enable_ops { int (*prepare_cpu)(int); @@ -14,7 +16,7 @@ static struct smp_enable_ops smp_enable_ops[NR_CPUS]; static int __init smp_spin_table_cpu_up(int cpu) { - paddr_t *release; + paddr_t __iomem *release; if (!cpu_release_addr[cpu]) { @@ -22,12 +24,20 @@ static int __init smp_spin_table_cpu_up(int cpu) return -ENODEV; } - release = __va(cpu_release_addr[cpu]); + release = ioremap_nocache(cpu_release_addr[cpu], 8); + if ( !release ) + { + dprintk(XENLOG_ERR, "CPU%d: Unable to map release address\n", cpu); + return -EFAULT; + } release[0] = __pa(init_secondary); flush_xen_data_tlb_range_va((vaddr_t)release, sizeof(*release)); + iounmap(release); + sev(); + return 0; } -- 2.30.2